/**
 * 
 */
package com.cap.cfae;

import java.util.HashMap;
import java.util.Map;

import com.eos.foundation.data.DataObjectUtil;
import com.eos.foundation.database.DatabaseUtil;
import com.eos.system.annotation.Bizlet;

import commonj.sdo.DataObject;


/**
 * @author zp
 * @date 2018-01-30 21:40:34
 *
 */
@Bizlet("")
public class BondsDetails {
	
	@Bizlet("getUnderwriteAnalyChart")
	public Map<String,Object> getBondsDetailsByUnderwriteName(Integer currentPage,Integer pageSize,String underwriteName)
	{
		 DataObject  bondDetail = DataObjectUtil.createDataObject("com.cap.cfae.cfae.BondsDetails");
		 bondDetail.set("administor", underwriteName);
		 Integer  total=DatabaseUtil.countByTemplate("default", bondDetail);
		 DataObject[] bonds= DatabaseUtil.queryEntitiesByTemplate("default", bondDetail, (currentPage-1)*pageSize, pageSize);
		 Map<String,Object> result=new HashMap<String,Object>();
		 result.put("data", bonds);
		 result.put("total", total);
		 return result;
	}

}
